<template>
    <div>
        <el-card class="!border-none" shadow="never">
            <el-page-header content="新建版权" @back="$router.back()" />
        </el-card>
        <el-card class="mt-4 !border-none" shadow="never">
            <el-tabs v-model="activeName">
                <el-tab-pane label="基本信息" name="first">
                    <basic-data />
                </el-tab-pane>
                <el-tab-pane label="开卷信息" name="followUp">
                    <uncoil-data />
                </el-tab-pane>
                <el-tab-pane label="附件" name="second">
                    <annex-data />
                </el-tab-pane>
                <!-- <el-tab-pane label="签核历史" name="third"> 签核历史</el-tab-pane> -->
            </el-tabs>
        </el-card>
        <footer-btns>
            <div style="padding: 20px">
                <el-button type="primary">
                    <template #icon>
                        <icon name="el-icon-Plus" />
                    </template>
                    保存
                </el-button>
                <el-button @click="submitAdd()">提交</el-button>
            </div>
        </footer-btns>

        <submitEditPopup v-if="submitshowEdit" ref="submiteditRef" @success="getLists"
            @close="submitshowEdit = false" />
    </div>
</template>

<script lang="ts" setup>
import basicData from './basicData.vue'

import uncoilData from '@/views/proposal/addProposal/copyright/uncoilData.vue'
import annexData from './clientFile/annexData.vue'
import submitEditPopup from '../edit.vue'

const activeName = 'first'


const submitshowEdit = ref(false)
const submiteditRef = shallowRef<InstanceType<typeof submitEditPopup>>()

const submitAdd = async () => {
    submitshowEdit.value = true
    await nextTick()
    submiteditRef.value?.open('add')
}
const Submit = () => {

}

const tableData = ref([
    { nodeName: '启动流程', staffType: '用户', allowEdit: true, auditor: '审计员1', nextStep: '2' },
    { nodeName: '节点2', staffType: '角色', allowEdit: true, auditor: '审计员2', nextStep: '3' },
    { nodeName: '结束', staffType: '岗位', allowEdit: true, auditor: '审计员3', nextStep: '0' }
]);
</script>

<style></style>
